﻿
//$(".txtSoluong").keypress(function (event) {
//    if (event.which < 48 || event.which > 57) {
//        if (event.which == 8 || event.which == 127) {
//            return;
//        }
//        return false;
//    }
//}); 
function AddSoluong() {
    var soluong = parseInt(document.getElementById("ContentPlaceHolder1_UC_Chitietsanpham1_ListView1_txtSoLuong_0").value);
    if (soluong < 100) {
        document.getElementById("ContentPlaceHolder1_UC_Chitietsanpham1_ListView1_txtSoLuong_0").value = soluong + 1;
    }

}
function SubSoluong() {
    var soluong = parseInt(document.getElementById("ContentPlaceHolder1_UC_Chitietsanpham1_ListView1_txtSoLuong_0").value);
    if (soluong > 1) {
        document.getElementById("ContentPlaceHolder1_UC_Chitietsanpham1_ListView1_txtSoLuong_0").value = soluong - 1;
    }

}
function keypress2(e) {
    var keypressed = null;
    if (window.event) {
        keypressed = window.event.keyCode;
    }
    else {
        keypressed = e.which;
    }
    if (keypressed == 39) {
        return false;
    }
}
